<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>体检报告</title>
    <meta name="viewport" content="initial-scale=1.0,maximum-scale=1,user-scalable=no">
    <script th:src="@{/js/flexible.js}"></script>
    <script th:src="@{/js/jquery.min.js}"></script>
    <style>
        html,body{
            width: 100vw;
            height: 100vh;
            background: #f3f3f3;
        }
        *{
            margin: 0;
            padding: 0;
        }
        .content{
            /* width: 10rem;
            max-width: 10rem; */
            width: 100vw;
            padding-top: 1rem;
            padding-bottom: 1rem;
            margin: 0 auto;
            background-image:  linear-gradient(to left, #FAAE7C 0%, #F93F49 98%);
        }
        .info{
            /* width: 10rem; */
            width: 9.6rem;
            margin: 0 auto;
            max-width: 10rem;
            background-color: #ffffff;
            border-radius: 8px;
        }
        .infotitle{
            font-size: 32px;
            text-align: center;
            height: 70px;
            color: #fff;
            font-weight: bolder;
        }
        .infoli{
            height: 1.3rem;
            line-height: 1.3rem;
            /* background-color: #ffffff; */
            display:flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #eeeeee;
            /* margin-left: 0.26rem; */
            margin-left: 0.36rem;
            font-size: 16px;
        }
        .infoli:last-child{

            border-bottom: none;
        }
        .infoli-label{
            text-align: left;
            width: 2.8rem;
        }
        .infoli-value{
            text-align: left;
            width: 6.8rem;
            margin-left: 0.20rem;
        }
        .infobutton{
            width: 6.80rem;
            height: 1.2rem;
            line-height: 1.2rem;
            font-size: 18px;
            margin: 1rem auto;
            border-radius: 0.15rem;
            text-align: center;
            color: #ffffff;
            background-image:  linear-gradient(-48deg, #FAAE7C 0%, #F93F49 98%);
        }
        .infobutton a{
            color: #ffffff;
        }
        .infobutton a:link,.infobutton a:visited,.infobutton a:hover,.infobutton a:active{
            color: #ffffff;
            text-decoration:none;
        }
    </style>
</head>
<body>
<div class="content" id="content">
    <div class="infotitle">体检报告</div>
    <div class="info" id="info">
        <div class="infoli"><div class="infoli-label">姓名</div><div class="infoli-value" id="userName"></div></div>
        <div class="infoli"><div class="infoli-label">手机号</div><div class="infoli-value" id="phone"></div></div>
        <div class="infoli"><div class="infoli-label">证件类型</div><div class="infoli-value" id="cardType"></div></div>
        <div class="infoli"><div class="infoli-label">证件号码</div><div class="infoli-value" id="card"></div></div>
    </div>
</div>
<div class="infobutton"><a th:href="${url}" target="_blank">下载体检报告</a></div>

<script>
    $(document).ready(function(){
        var data = {
            userName: '[[${userName}]]',
            phone: '[[${phone}]]',
            cardType: '[[${cardType}]]',
            card: '[[${card}]]'
        };
        $('#userName').text(data.userName);
        $('#phone').text(Phone(data.phone));
        $('#cardType').text(data.cardType);
        $('#card').text(IdCard(data.card));
    });
    function Phone(phone){
        var phone = phone.toString()
        var showPhone = phone.substr(0,3)+'****'+phone.substr(7);
        return showPhone
    }
    function IdCard(idcard){
        var idcard = idcard.toString()
        var showIdCard = idcard.substr(0,5)+'*********'+idcard.substr(14);
        return showIdCard
    }
</script>
</body>
</html>
